/**
 * 
 */
package com.css.crm.dao.impl;

import java.util.List;
import org.apache.ibatis.session.SqlSession;
import com.css.crm.dao.CustomerRemarkQueueDao;
import com.css.crm.vo.CustomerRemarkQueueVo;

/**
 * Implementation for CustomerRemarkQueueDao
 * 
 * @author ais
 */
public class CustomerRemarkQueueDaoImpl extends BaseDaoImpl implements CustomerRemarkQueueDao {

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.css.crm.dao.CustomerRemarkQueueDao#getCustomerRemarkQueueByCustId
	 * (java.lang.String)
	 */
	@Override
	public List<CustomerRemarkQueueVo> getCustomerRemarkQueueByCustId(String custId) {
		SqlSession session = getMyBatisSession();
		return session.selectList("customerRemarkQueue.getCustomerRemarkQueueByCustId", custId);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.css.crm.dao.CustomerRemarkQueueDao#insertCustomerRemarkQueue(com.
	 * css.crm.vo.CustomerRemarkQueueVo)
	 */
	@Override
	public int insertCustomerRemarkQueue(CustomerRemarkQueueVo record) {
		SqlSession session = getMyBatisSession();
		return session.insert("customerRemarkQueue.insertCustomerRemarkQueue", record);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.css.crm.dao.CustomerRemarkQueueDao#deleteCustomerRemarkQueueByCustId
	 * (java.lang.String)
	 */
	@Override
	public int deleteCustomerRemarkQueueByCustId(String custId) {
		SqlSession session = getMyBatisSession();
		return session.delete("customerRemarkQueue.deleteCustomerRemarkQueueByCustId", custId);
	}
}
